package com.bootdo.lvyou.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.bootdo.lvyou.dao.LvyouScenicTicketDao;
import com.bootdo.lvyou.domain.LvyouScenicTicket;
import com.bootdo.lvyou.service.LvyouScenicTicketService;



@Service
public class LvyouScenicTicketServiceImpl implements LvyouScenicTicketService {
	@Autowired
	private LvyouScenicTicketDao lvyouScenicTicketDao;
	
	@Override
	public LvyouScenicTicket get(Long id){
		return lvyouScenicTicketDao.get(id);
	}
	
	@Override
	public List<LvyouScenicTicket> list(Map<String, Object> map){
		return lvyouScenicTicketDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return lvyouScenicTicketDao.count(map);
	}
	
	@Override
	public int save(LvyouScenicTicket lvyouScenicTicket){
	
		if(lvyouScenicTicket.getId() != null) {
			return lvyouScenicTicketDao.update(lvyouScenicTicket);
		}else {
			return lvyouScenicTicketDao.save(lvyouScenicTicket);
		}		
	
		
	}
	
	@Override
	public int update(LvyouScenicTicket lvyouScenicTicket){
		return lvyouScenicTicketDao.update(lvyouScenicTicket);
	}
	
	@Override
	public int remove(Long id){
		return lvyouScenicTicketDao.remove(id);
	}
	
	@Override
	public int batchRemove(Long[] ids){
		return lvyouScenicTicketDao.batchRemove(ids);
	}
	
}
